package com.gisocn.onemap.utils.tree;

import android.util.Log;
import com.gisocn.onemap.model.TreePoint;
import java.util.HashMap;

/* loaded from: classes2.dex */
public class TreeUtils {
    public static int getLevel(TreePoint treePoint, HashMap<String, TreePoint> hashMap) {
        if ("0".equals(treePoint.getPARENTID())) {
            return 0;
        }
        return getLevel(getTreePoint(treePoint.getPARENTID(), hashMap), hashMap) + 1;
    }

    public static TreePoint getTreePoint(String str, HashMap<String, TreePoint> hashMap) {
        if (hashMap.containsKey(str)) {
            return hashMap.get(str);
        }
        Log.e("xlc", "ID:" + str);
        return null;
    }
}
